package com.aurora.app.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.stereotype.Repository;

import com.aurora.base.entity.BaseEntity;
/**
 * 积分添加历史
 * @author yongjiang.lin
 *
 */
@Repository
@Table(name="tb_integral_history")
public class IntegralHistory extends BaseEntity {
	//新增积分
	private Float integral;
	//添加用户
	private User user;
	//备注
	private String remark;
	
	@Column(name="f_integral")
	public Float getIntegral() {
		return integral;
	}
	public void setIntegral(Float integral) {
		this.integral = integral;
	}
	
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_user_id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Column(name="f_remark")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
